# 计算角度
import math


def cal_angle(point_a, point_b, point_c):
    """
    计算∠abc的角度
    :param point_a: a的坐标
    :param point_b: b的坐标
    :param point_c: c的坐标
    :return: ∠abc的角度
    """
    # a_x, b_x, c_x = point_a[0], point_b[0], point_c[0]
    # a_y, b_y, c_y = point_a[1], point_b[1], point_c[1]
    # x1, y1 = (a_x - b_x), (a_y - b_y)
    # x2, y2 = (c_x - b_x), (c_y - b_y)
    # cos_b = (x1 * x2 + y1 * y2) / (math.sqrt(x1 ** 2 + y1 ** 2) * (math.sqrt(x2 ** 2 + y2 ** 2)))
    # B = math.degrees(math.acos(cos_b))
    # return round(B, 2)


print(cal_angle((3 ** 0.5, 1), (0, 0), (3 ** 0.5, 0)))
print(cal_angle((1, 1), (0, 0), (1, 3)))
print(cal_angle((-1, 1), (0, 0), (1, 0)))
